var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
var mes='<p>欢迎你注册cose，请在注册12小时之内点击下面链接激活你的账号</p> ' +
    '<a href="http://localhost:3000/">' +
    'http://localhost:3000/</a> '
    var nodemailer = require('nodemailer');
    var transporter = nodemailer.createTransport({
        service: '126',
        auth: {
            user: 'kongmuo@126.com',
            pass: '982011687'
        }
    });
    var mailOptions = {
        from: 'Fred Foo<kongmuo@126.com>', // sender address
        to: '982011687@qq.com', // list of receivers
        subject: 'cose', // Subject line
        text: 'cose 注册验证', // plaintext body
        html: mes // html body
    };
    transporter.sendMail(mailOptions, function(error, info){
        if(error){
            console.log(error);
        }else{
            console.log('Message sent: ' + info.response);
        }
    });

  res.render('hello', { me: '大家好',se:"呃呃呃"});
});

module.exports = router;